package com.yanchi.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanchi
 */
@RestController
@EnableDiscoveryClient
public class OrderController {

    @Value("${server.port}")
    private Integer port;

    @GetMapping("order")
    public String orderDemo() throws InterruptedException {
        Thread.sleep(2000);
        return "order demo ok !!!" + port;
    }
}
